<?php
	if($logged)
	{
	 	// Config
		$data = array(
		    "id"	=> "logoutButton",
		    "name"	=> "logoutButton",
		    "type"	=> "submit",
		    "value"	=> "logout");
	    
	    $attributes = array(
		    "name"	=> "logoutForm",
		    "id"	=> "logoutForm");
	    
		// Print logout
	    echo 
			"<p>Logged as " . $user->GetUser() . "</p>" .
	 		 "<p>"
				. form_open(current_url(), $attributes) . 
				  form_submit($data) . 
				  form_close() . 
		 	 "</p>";
	}
	else
	{
		// Print login
		echo 
		"<p>
			<a href='".site_url()."/login/show_login'>Login here</a>
		</p>";
	}